package com.educhains.module.activity.service.impl;

import com.educhains.module.activity.persist.dao.ActivityReplyDAO;
import com.educhains.module.activity.persist.mybatis.InfloorActivityMapper;
import com.educhains.module.activity.service.ActivityReplyService;
import com.educhains.module.activity.vo.mb_model.ActivityReply;
import com.educhains.module.activity.vo.mb_model.InfloorActivity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ActivityReplyServiceImpl implements ActivityReplyService{

    @Autowired
    private ActivityReplyDAO activityReplyDAO;
    @Autowired
    private InfloorActivityMapper infloorActivityMapper;

    public List<ActivityReply> selectActivityReplyList(String activityId) {
        return activityReplyDAO.selectActivityReplyList(activityId);
    }

    public int createActivityReply(ActivityReply activityReply) {
        return activityReplyDAO.createActivityReply(activityReply);
    }

    public int selectActivityReplyCount(String activityId) {
        return activityReplyDAO.selectActivityReplyCount(activityId);
    }

    public List<ActivityReply> selectActivityTargetReplyList(String activityReplyId) {
        return activityReplyDAO.selectActivityTargetReplyList(activityReplyId);
    }

    //the InfloorActivity method is defined in activityReplyDAO
    public List<InfloorActivity> selectInfloorByFloorId(String floorId) {
        return activityReplyDAO.selectInfloorByFloorId(floorId);
    }

    public int insertInfloorActivitySelective(InfloorActivity record) {
        return infloorActivityMapper.insertSelective(record);
    }
}
